This code is of chess game. What is represented by 'DISTANCE' in code? [closed]

Posted by rajeshverma423 on Game Development See other posts from Game Development or by rajeshverma423
Published on 2012-06-05T11:33:09Z Indexed on 2012/06/05 16:48 UTC
Read the original article Hit count: 365

Filed under:
package chess;

public class Evaluate {   
public static final int PIECE_KING = 0;   
public static final int PIECE_QUEEN = 1;   
public static final int PIECE_ROOK = 2;
public static final int PIECE_BISHOP = 3;
public static final int PIECE_KNIGHT = 4;
public static final int PIECE_PAWN = 5;
public static final int FULL_BIT_RANK = 4080;
public static final int LAZY_MARGIN = 100;
public static final int ISOLATED_PENALTY = 10;
public static final int DOUBLE_PENALTY = 4;
public static final int[] PIECE_VALUE = { 0, 9, 5, 3, 3, 1 };

  public static final int[] PASS_PAWN = { 0, 35, 30, 20, 10, 5 };

  public static final byte[] DISTANCE = { 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 3, 4, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 
    0, 0, 0, 0, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 
    0, 0, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 
    0, 0, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 
    0, 0, 0, 0, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 3, 4, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 4, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 5, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 6, 7, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 };

© Game Development or respective owner

Related posts about chess